#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    int num[n];
    for (int i=0;i<n;i++) {scanf("%d", &num[i]);}
    int current=num[0];
    int length=1;
    int maxlenth=1;
    for (int i=1;i<n;i++) {
        if (num[i]!=current){
            length=1;
            current=num[i];
        }else{
            length++;
            if (length>maxlenth){
                maxlenth=length;
            }
        }
    }
    printf("%d", maxlenth);
    return 0;
}